﻿@{
    ViewBag.Title = "NatureTypeAdd";
}
@section head
{
    <script src="@Url.Content("~/ScriptPlugin/validate/validate.js")"></script>
    <link href="@Url.Content("~/ScriptPlugin/validate/validate.css")" rel="stylesheet" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/form2json.js")"></script>
    <script type="text/javascript">
        function SaveData(index) {
            if (K.Validate())
            {
                K.AjaxJson("@Url.Content("~/Customer/Nature/NatureTypeInsert")",{ dtos: form2Json() }, function (result) {
                    parent.K.layer.callback(index, result);
                    parent.K.layer.close(index);
                });
            }
        }
    </script>
}
<form action="">
    <div class="content-form" style="height:100%">
        <table class="content-table" style="height:100%">
            <tr>
                <th><span>性质名称</span></th>
                <td>
                    <input type="text" data-validate-option="isNull" id="Name" name="Name" />
                </td>
                <th>上级性质</th>
                <td>
                    <input type="text" id="ParentName" name="ParentName" class="p-icon-right p-icon-catalog" readonly="readonly" onclick="getParent()" />
                    <input type="hidden" id="ParentId" name="ParentId" />
                </td>
            </tr>
            <tr>
                <th>性质编码</th>
                <td><input type="text" id="Code" name="Code"/></td>
                <th>性质排序</th>
                <td>
                    <input type="text" style="ime-mode: Disabled" id="Order" value="0" name="Order" onkeypress="KingsSharp.OnlyNum();"/>
                </td>
            </tr>
            <tr>
                <th>是否允许多选</th>
                <td>
                    <select id="Multi" name="Multi">
                        <option value="false">否</option>
                        <option value="true">是</option>
                    </select>
                </td>
                <th>是否产生履历</th>
                <td>
                    <select id="EidtBuildResume" name="EidtBuildResume">
                        <option value="false">否</option>
                        <option value="true">是</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th>性质说明</th>
                <td colspan="3">
                    <input type="text" id="Description" name="Description" />
                </td>
            </tr>
            <tr style="height:100%">
                <td colspan="4" style="padding:1px 1px 0px 1px;vertical-align:top">
                    <div class="remark">
                        <div>1、上级性质一经保存后将无法修改</div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form>
@section foot
{
    <script type="text/javascript">
        function getParent()
        {
            K.layer.iframe({
                title: "选择上级性质",
                content: "@Url.Content("~/Customer/Nature/NatureTypeTree")",
            area: ["360px", "335px"],
            callback: function (node) {
                $("#ParentName").val(node.name);
                $("#ParentId").val(node.id);
            }
        });
        }
    </script>
}